import android.content.Context
import android.widget.Toast
import com.hjq.toast.ToastUtils

/**
 * Create by JohnRambo at 2018/7/13
 */

object Toastor {
    var success: Toast? = null
    var info: Toast? = null
    var error: Toast? = null
    var normal: Toast? = null
    var warning: Toast? = null
}

fun Context.toast(text: String, duration: Int = Toast.LENGTH_SHORT) {
    ToastUtils.show( text)
}


fun Context.infoToast(text: String, duration: Int = Toast.LENGTH_SHORT) {
    ToastUtils.show( text)
}

fun Context.errorToast(text: String, duration: Int = Toast.LENGTH_LONG) {
    ToastUtils.show(text)
}

fun Context.successToast(text: String, duration: Int = Toast.LENGTH_SHORT) {
    ToastUtils.show( text)
}

fun Context.warningToast(text: String, duration: Int = Toast.LENGTH_LONG) {
    ToastUtils.show(text)
}